package com.ziyun.pop.mall.module.goods.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.service.common.constant.AppType;
import com.service.goods.api.GoodsService;
import com.service.goods.constant.GoodsResult;
import com.service.goods.model.goods.BaseGoodsInfoVO;
import com.service.goods.model.goods.GoodsParamsVO;

/**
 * goods商品service
 * 
 * @Author:chenxiaoyi
 * @Date:2018/9/3 8:24
 */
@Service
@Transactional
public class PopGoodsService {

	private static Logger _log = LoggerFactory.getLogger(PopGoodsService.class);

	@Autowired
	private GoodsService goodsService;

	/**
	 * 获取标品的商品详情
	 * 
	 * @param goodsId
	 *            商品id
	 * @return
	 */
	public GoodsResult<BaseGoodsInfoVO> getGoodsInfo(Long goodsId) {
		return goodsService.getGoodsInfo(AppType.pc, goodsId, null, null, null);
	}

	/**
	 * 根据选项参数，获取价格详情
	 * 
	 * @param goodsParamsVO
	 *            参数组装vo
	 * @return
	 */
	public GoodsResult<?> getSellPrice(GoodsParamsVO goodsParamsVO) {
		return goodsService.getSellPrice(AppType.pc, goodsParamsVO);
	}

}
